package com.mayikt.pay.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.fastjson.JSONObject;
import com.mayikt.pay.producer.IntegralProducer;

@RestController
public class TestServiceImpl {
	@Autowired
	private IntegralProducer integralProducer;

	@RequestMapping("/integralSend")
	public String integralSend() {
		JSONObject jsonObject = new JSONObject();
		jsonObject.put("paymentId", "2019");
		jsonObject.put("userId", 1l);
		jsonObject.put("integral", 1l);
		integralProducer.send(jsonObject);
		return "success";
	}

}
